1
Welcome to R: Navigating the Environment
AI014 Lesson 1
00:00

R is more than a language; it is an integrated suite of software facilities for data manipulation and calculation. Mastery begins not with code, but with workspace protocol.

1. Environmental Initialization

Effective R usage begins at the system level. Creating a dedicated directory and navigating into it ensures your object workspace and history files remain organized before launching the R interpreter.

# Shell Commands
$ mkdir work
$ cd work
$ R

2. The Documentation Hierarchy

R provides a self-documentation ecosystem. Use help.start() for a browser-based overview or help.search() for keyword queries. For specific functions, the ? shortcut is standard.

$ mkdir work$ cd work$ R> help.start()> ?solve> example(topic)> q()

3. The Example Logic

Functions often contain complex internal logic. Running example(topic) reveals practical implementation, such as the compound expression (x+1)[(!is.na(x)) & x>0] -> z, which demonstrates how operators like +, |, and functions like is.na() cooperate to subset data.

main.py
TERMINAL bash — 80x24
> Ready. Click "Run" to execute.
>